#   SCE CONFIDENTIAL
#   PLAYSTATION(R)3 Programmer Tool Runtime Library 192.001
#   Copyright (C) 2006 Sony Computer Entertainment Inc.
#   All Rights Reserved.
#


#----------------------------------------------------------------------
# PPU
#----------------------------------------------------------------------

PPUGCC_DIR              ?= $(CELL_HOST_PATH)/ppu/bin

PPU_PREFIX              = $(PPUGCC_DIR)/ppu-lv2-
PPU_AR                  = $(PPU_PREFIX)ar
PPU_AS                  = $(PPU_PREFIX)as
PPU_CCAS                = $(PPU_PREFIX)gcc
PPU_CC                  = $(GCC_PREFIX) $(PPU_PREFIX)gcc
PPU_CXX                 = $(GCC_PREFIX) $(PPU_PREFIX)g++
PPU_LD                  = $(PPU_PREFIX)ld
PPU_CCLD                = $(PPU_PREFIX)gcc
PPU_CXXLD               = $(PPU_PREFIX)g++
PPU_NM                  = $(PPU_PREFIX)nm
PPU_OBJCOPY             = $(PPU_PREFIX)objcopy
PPU_OBJDUMP             = $(PPU_PREFIX)objdump
PPU_RANLIB              = $(PPU_PREFIX)ranlib
PPU_SIZE                = $(PPU_PREFIX)size
PPU_STRINGS             = $(PPU_PREFIX)strings
PPU_STRIP               = $(PPU_PREFIX)strip

PPU_DBG_FLAGS           ?= -g
PPU_OPTIMIZE_LV         ?= -O2
PPU_CSTDFLAGS           ?= $(CSTDFLAGS)
PPU_CXXSTDFLAGS         ?= $(CXXSTDFLAGS)
PPU_CWARNFLAGS          ?= $(CWARNFLAGS_L2)
PPU_CXXWARNFLAGS        ?= $(CXXWARNFLAGS_L2)
PPU_INCDIRS             ?=
PPU_CPPFLAGS            ?=
PPU_MACHINE_OPTION      ?=

PPU_TARGET_PATH         = $(CELL_TARGET_PATH)/ppu
PPU_PSGL_LIBDIR         = $(PPU_TARGET_PATH)/lib/PSGL/$(CELL_GPU_TYPE)/$(CELL_PSGL_VERSION)

# for backward compatibility (obsoleted)
PSGL_LIBDIR             ?= $(PPU_PSGL_LIBDIR)

PPU_ASFLAGS             ?= $(ASFLAGS) $(PPU_INCDIRS) $(PPU_CPPFLAGS) -mregnames
PPU_MDFLAGS             ?=
PPU_LDFLAGS             ?=
PPU_LOADLIBS            ?=
PPU_LDLIBS              ?=
PPU_LDLIBDIR            ?=
PPU_CFLAGS              ?= \
	$(PPU_DBG_FLAGS) \
	$(PPU_OPTIMIZE_LV) \
	$(PPU_CSTDFLAGS) \
	$(PPU_CWARNFLAGS) \
	$(PPU_INCDIRS) \
	$(PPU_CPPFLAGS) \
	$(PPU_MDFLAGS) \
	-DCELL_DATA_DIR=\"$(CELL_DATA_DIR)\"

PPU_CXXFLAGS            ?= \
	$(PPU_DBG_FLAGS) \
	$(PPU_OPTIMIZE_LV) \
	$(PPU_CXXSTDFLAGS) \
	$(PPU_CXXWARNFLAGS) \
	$(PPU_INCDIRS) \
	$(PPU_CPPFLAGS) \
	$(PPU_MDFLAGS) \
	-DCELL_DATA_DIR=\"$(CELL_DATA_DIR)\"

